package com.contory.ssn_lgnd.app;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;

import com.contory.ssn_lgnd.app.maingame.MainGame;
import com.contory.ssn_lgnd.app.title.Title;
import com.contory.ssn_lgnd.framework.Screen;
import com.contory.ssn_lgnd.framework.impl.GLGame;
public class MainActivity extends GLGame {
	boolean firstTimeCreate = true;
    
	@Override 
    public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	public Screen getStartScreen() {
		//return new Title(this);
		return new MainGame(this);
	}
    
    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {         
        if(firstTimeCreate) {
        	Settings.load(getFileIO());
            Assets.load(this);
        	firstTimeCreate = false;            
        } else {
            Assets.reload();
        }
        super.onSurfaceCreated(gl, config);
    }     
    
    @Override
    public void onPause() {
        super.onPause();
    }
    
    @Override
    public void onResume() {
        super.onResume();
    }
}
